package com.un.ebs.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.un.ebs.product.domain.ProductSkuDoc;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * (ProductSkuDoc)表数据库访问层
 *
 * @author liubo
 * @since 2020-11-18 13:55:14
 */
public interface ProductSkuDocMapper extends BaseMapper<ProductSkuDoc> {

    @Select("select ISNULL(MAX(version_code)+1,1) from tb_product_sku_doc where sku_id=#{skuId}")
    int maxVersion(@Param("skuId") String skuId);

}